﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="QuangCao.aspx.cs" Inherits="Admin_QuangCao" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <table cellpadding="0" cellspacing="0" class="style2">
                <tr>
                    <td>
                        Tên công ty:</td>
                    <td>
                        <asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Ngày đăng:</td>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Ngày hủy:</td>
                    <td>
                        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="Btn_Tim" runat="server" Text="Tìm" onclick="Btn_Tim_Click" />
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Label ID="Label1" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                            onpageindexchanging="GridView1_PageIndexChanging" 
                            onrowcancelingedit="GridView1_RowCancelingEdit" 
                            onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
                            DataKeyNames="HinhAnh" AllowPaging="True" PageSize="5">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="TenCT" HeaderText="Tên Công Ty" />
                                <asp:TemplateField HeaderText="Hình ảnh">
                                    <ItemTemplate>
                                        <asp:Image ID="Image1" runat="server" 
                                            ImageUrl='<%# Eval("HinhAnh","~/Pictures/QuangCao/{0}") %>' Height="200px" 
                                            Width="150px" />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:FileUpload ID="FileUpload1" runat="server" />
                                        &nbsp;
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="DonGia" HeaderText="Đơn giá" />
                                <asp:BoundField DataField="UuTien" HeaderText="Ưu tiên" />
                                <asp:BoundField DataField="URL" HeaderText="URL" />
                                <asp:BoundField DataField="NgayDang" HeaderText="Ngày đăng" />
                                <asp:BoundField DataField="NgayHuy" HeaderText="Ngày Hủy" />
                                <asp:CommandField CancelText="Hủy" EditText="Sửa" ShowEditButton="True" 
                                    UpdateText="Lưu" />
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="btnThem" runat="server" onclick="btnThem_Click" Text="Thêm" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Xóa" />
                    </td>
                </tr>
            </table>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <table cellpadding="0" cellspacing="0" class="style2">
                <tr>
                    <td style="width: 164px">
                        Tên công ty :</td>
                    <td>
                        <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 164px">
                        Quảng cáo :</td>
                    <td>
                        <input ID="File2" type="file" runat="server"/></td>
                </tr>
                <tr>
                    <td style="width: 164px">
                        Đơn giá :</td>
                    <td>
                        <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 164px">
                        Ưu tiên :</td>
                    <td>
                        <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 164px">
                        URL : </td>
                    <td>
                        <asp:TextBox ID="TextBox10" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 164px">
                        Ngày đăng :</td>
                    <td>
                        <asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 164px">
                        Ngày hủy :</td>
                    <td>
                        <asp:TextBox ID="TextBox8" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 164px">
                        &nbsp;</td>
                    <td>
                        <asp:Button ID="btnLuu" runat="server" onclick="btnLuu_Click" Text="Lưu" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnHuy" runat="server" onclick="btnHuy_Click" Text="Hủy" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>

